package com.ysstech.gateway;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.ysstech.common.util.SpringContextUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.ApplicationContext;

/**
 * 网关服务启动类
 */
@MapperScan({"com.ysstech.common.mapper"})
@EnableZuulProxy
@EnableHystrixDashboard
@SpringBootApplication(exclude = DruidDataSourceAutoConfigure.class)
public class GatewayApplication {

    public static void main(String[] args) {
        ApplicationContext applicationContext = SpringApplication.run(GatewayApplication.class, args);
        new SpringContextUtil().setApplicationContext(applicationContext);
    }

}
